//
//  NSArray+RandomSort.m
//  jkds
//
//  Created by perfay on 2018/3/29.
//  Copyright © 2018年 perfaylk. All rights reserved.
//

#import "NSArray+RandomSort.h"

@implementation NSArray (RandomSort)
- (NSArray *)randomSort{
    NSArray *array = [self sortedArrayUsingComparator:^NSComparisonResult(id  _Nonnull obj1, id  _Nonnull obj2) {
        if (arc4random()%2) {
            return obj1 > obj2;
        }
        else{
            return obj2 > obj1;
        }
    }];
    return  array;
}
@end
